// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_REP_REGISTER_ATTACHED
// * CreateDate    : 2014-06-05 18:30:33
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:33
// * LastChanger   : 2014-06-05 18:30:33
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class RepRegisterAttachedEntity : EntityBase
    {
        public RepRegisterAttachedTable TableSchema
        {
            get
            {
                return RepRegisterAttachedTable.Current;
            }
		}
		
		public RepRegisterAttachedEntity()
        {

        }
		
		public RepRegisterAttachedEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.AttachedId = Convert.ToString(CommonFunctions.ToObject(dr["ATTACHED_ID"]));
			this.RegisterId = Convert.ToString(CommonFunctions.ToObject(dr["REGISTER_ID"]));
			this.RegisterItemId = Convert.ToString(CommonFunctions.ToObject(dr["REGISTER_ITEM_ID"]));
			this.FileName = Convert.ToString(CommonFunctions.ToObject(dr["FILE_NAME"]));
			this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
			this.UploadBy = Convert.ToString(CommonFunctions.ToObject(dr["UPLOAD_BY"]));
			this.UploadDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPLOAD_DATE"]));
        }
		
		public RepRegisterAttachedEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.AttachedId = Convert.ToString(CommonFunctions.ToObject(dr["ATTACHED_ID"]));
			this.RegisterId = Convert.ToString(CommonFunctions.ToObject(dr["REGISTER_ID"]));
			this.RegisterItemId = Convert.ToString(CommonFunctions.ToObject(dr["REGISTER_ITEM_ID"]));
			this.FileName = Convert.ToString(CommonFunctions.ToObject(dr["FILE_NAME"]));
			this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
			this.UploadBy = Convert.ToString(CommonFunctions.ToObject(dr["UPLOAD_BY"]));
			this.UploadDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPLOAD_DATE"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return RepRegisterAttachedTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string AttachedId
        {
            get { return Convert.ToString(GetData(RepRegisterAttachedTable.C_ATTACHED_ID)); }
            set { SetData(RepRegisterAttachedTable.C_ATTACHED_ID, value); }
        }
		
        [DataMember]
        public string RegisterId
        {
            get { return Convert.ToString(GetData(RepRegisterAttachedTable.C_REGISTER_ID)); }
            set { SetData(RepRegisterAttachedTable.C_REGISTER_ID, value); }
        }
		
        [DataMember]
        public string RegisterItemId
        {
            get { return Convert.ToString(GetData(RepRegisterAttachedTable.C_REGISTER_ITEM_ID)); }
            set { SetData(RepRegisterAttachedTable.C_REGISTER_ITEM_ID, value); }
        }
		
        [DataMember]
        public string FileName
        {
            get { return Convert.ToString(GetData(RepRegisterAttachedTable.C_FILE_NAME)); }
            set { SetData(RepRegisterAttachedTable.C_FILE_NAME, value); }
        }
		
        [DataMember]
        public string Description
        {
            get { return Convert.ToString(GetData(RepRegisterAttachedTable.C_DESCRIPTION)); }
            set { SetData(RepRegisterAttachedTable.C_DESCRIPTION, value); }
        }
		
        [DataMember]
        public string UploadBy
        {
            get { return Convert.ToString(GetData(RepRegisterAttachedTable.C_UPLOAD_BY)); }
            set { SetData(RepRegisterAttachedTable.C_UPLOAD_BY, value); }
        }
		
        [DataMember]
        public DateTime UploadDate
        {
            get { return Convert.ToDateTime(GetData(RepRegisterAttachedTable.C_UPLOAD_DATE)); }
            set { SetData(RepRegisterAttachedTable.C_UPLOAD_DATE, value); }
        }
		
		#endregion
	}
	
	
}	

